<!doctype html>
<html>
    <head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>商品评价</title>
        <link rel="stylesheet" href="__ROOT__/Apps/Home/View/{$WST_STYLE}/css/common.css" />
        <link rel="stylesheet" href="__ROOT__/Apps/Home/View/{$WST_STYLE}/css/user.css">
   		<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/webuploader/webuploader.css" />

		<script src="__PUBLIC__/js/jquery.min.js"></script>
	    <script type="text/javascript">
	    var WST = ThinkPHP = window.Think = {
	            "ROOT"   : "__ROOT__",
	            "APP"    : "__APP__",
	            "PUBLIC" : "__PUBLIC__",
	            "DEEP"   : "{:C('URL_PATHINFO_DEPR')}",
	            "MODEL"  : ["{:C('URL_MODEL')}", "{:C('URL_CASE_INSENSITIVE')}", "{:C('URL_HTML_SUFFIX')}"],
	            "VAR"    : ["{:C('VAR_MODULE')}", "{:C('VAR_CONTROLLER')}", "{:C('VAR_ACTION')}"],
	            "DOMAIN" : "{:WSTDomain()}",
	            "WST_STYLE" :"{$WST_STYLE}"
	    }
	    </script>
	    <script src="__PUBLIC__/js/think.js"></script>
    </head>
    
    <body style="background-color:#f5f5f5;">
        <div style="text-align:center;">
        	<div class="wst-appraise-box">
				<div>
					<div class="appraise-title"><span style="color:red;">商品评价</span><span class='tips'>&nbsp;&nbsp;&nbsp;&nbsp;对商品进行评价</span></div>
				</div>
				<div class='main'>
					<div class="head">
						<div class="goods-no">序号</div>
						<div class="goods-name">商品</div>
						<div class="goods-status">评价</div>
						<div class="goods-buy-time">购买时间</div>
						<div style="clear: both;"></div>
					</div>
						
					<volist name="orderInfo['goodsList']" id="goods" key='key1'>
					<div class="selgoods">
						<div class="goods-no goods-txt">{$key+1}</div>
						<div class="goods-name goods-txt">
							<div>
								<div style="float: left;width: 65px;">
								<a href="{:U('Home/Goods/getGoodsDetails',array('goodsId'=>$goods['goodsId']))}" target="_blank">
								<img class='goods-img' src="__ROOT__/{$goods['goodsThums']}" width="60" height="60"/>
								</a>
								</div>
								<div class='goods-name2 goods-txt' style="line-height:normal;padding-top:25px;">
									<a href="{:U('Home/Goods/getGoodsDetails',array('goodsId'=>$goods['goodsId']))}" target="_blank">{$goods["goodsName"]}</a><br/>
									{$goods["goodsAttrName"]}
								</div>
							</div>
						</div>
						<div id="{$goods['goodsId']}_{$goods['goodsAttrId']}_status" class="goods-status goods-txt">
							<if condition='$goods["gaId"] eq ""'>
							未评价
							<else/>
							已评价
							</if>
						</div>
						<div class="goods-buy-time goods-txt">{$orderInfo['order']['createTime']}</div>
						<div style="clear: both;"></div>
					</div>
					<if condition='$goods["gaId"] eq ""'>
					<div id="{$goods['goodsId']}_{$goods['goodsAttrId']}_appraise" class="appraise-box">
						<div class="main-box">
							<div class="item">
								<div class='title'>商品评分：</div>								
								<div class='content'>
									<div class="{$goods['goodsId']}_{$goods['goodsAttrId']}_goodsScore" style='float:left'></div>
									<div id="{$goods['goodsId']}_{$goods['goodsAttrId']}_goodsScore_hint" style='float:left'></div>
								</div>
								<div style="clear: both;"></div>
							</div>
							<div class="item">
								<div class='title'>时效得分：</div>								
								<div class='content'>									
									<div class="{$goods['goodsId']}_{$goods['goodsAttrId']}_timeScore" style='float:left'></div>
									<div id="{$goods['goodsId']}_{$goods['goodsAttrId']}_timeScore_hint" style='float:left'></div>
								</div>
								<div style="clear: both;"></div>
							</div>
							<div class="item">
								<div class='title'>服务得分：</div>								
								<div class='content'>
								    <div class="{$goods['goodsId']}_{$goods['goodsAttrId']}_serviceScore" style='float:left'></div>
								    <div id="{$goods['goodsId']}_{$goods['goodsAttrId']}_serviceScore_hint" style='float:left'></div>									
								</div>
								<div style="clear: both;"></div>
							</div>
							<div class="item">
								<div class='title'>点评内容：</div>					
								<div class='content'>									
									<textarea rows="5" cols="70" style="width:610px;" name="{$goods['goodsId']}_{$goods['goodsAttrId']}_content" id="{$goods['goodsId']}_{$goods['goodsAttrId']}_content" maxlength="50"></textarea>
								</div>
								<div style="clear: both;"></div>
							</div>
							<div class="item">
								<div id='picBox-{$goods['goodsId']}' style='height:120px;width:735px;padding:5px;'>
								<div id="filePicker-{$goods['goodsId']}" style='margin-left:0px;width:300px;'>上传附件(最多5张)</div>
								<div style="clear: both;"></div>
							</div>
							<div id="checkout" class="btn-box" >						
								<a class="btn-submit" href="javascript:;" onclick="addGoodsAppraises({$orderInfo['order']['shopId']},{$goods['goodsId']},'{$goods['goodsAttrId']}',{$orderInfo['order']['orderId']})">
									<button class='wst-btn-query'>评价</button>
								</a>
								<div style="clear: both;"></div>
							</div>
							<div style="clear: both;"></div>
						</div>
					</div>
					</if>
					</volist>					
					
				</div>
				
			</div>
        </div>
    </body>
    <script type="text/javascript" src="__PUBLIC__/plugins/webuploader/webuploader.js"></script>
    <script src="__PUBLIC__/js/common.js"></script>
	     <script src="__PUBLIC__/plugins/layer/layer.min.js"></script>
	     <script src="__ROOT__/Apps/Home/View/{$WST_STYLE}/js/usercom.js"></script>
	     <script type="text/javascript" src="__PUBLIC__/plugins/raty/jquery.raty.min.js"></script>
    	 <script type="text/javascript">
    	 	$(function(){
			   appraiseInit({$goods['goodsId']});
		   });
    	 	var shopId = "{$orderInfo['shopId']}";
	   		//添加商品评价
			
	   		$(function(){
	   			var options = {
	   					hints         : ['很不满意', '不满意', '一般', '满意', '非常满意'],
	   					width:200,
	   					targetKeep: true,
	   					starHalf:'__PUBLIC__/plugins/raty/img/star-half-big.png',
	   					starOff:'__PUBLIC__/plugins/raty/img/star-off-big.png',
	   					starOn:'__PUBLIC__/plugins/raty/img/star-on-big.png',
	   					cancelOff: '__PUBLIC__/plugins/raty/img/cancel-off-big.png',
	   				    cancelOn: '__PUBLIC__/plugins/raty/img/cancel-on-big.png'
	   		    }
	   			<volist name="orderInfo['goodsList']" id="goods" key='key1'>
	   			options.target='#{$goods['goodsId']}_{$goods['goodsAttrId']}_goodsScore_hint';
	   			$('.{$goods['goodsId']}_{$goods['goodsAttrId']}_goodsScore').raty(options);
	   			options.target='#{$goods['goodsId']}_{$goods['goodsAttrId']}_timeScore_hint';
	   			$('.{$goods['goodsId']}_{$goods['goodsAttrId']}_timeScore').raty(options);
	   			options.target='#{$goods['goodsId']}_{$goods['goodsAttrId']}_serviceScore_hint';
	   			$('.{$goods['goodsId']}_{$goods['goodsAttrId']}_serviceScore').raty(options);
	   			</volist>
	   		});
	   		
		</script>
</html>
